<template>
  <el-card class="service-card" shadow="hover">
    <img :src="service.team_img" class="service-image" />
    <div class="service-content">
      <h3 class="service-title">{{ service.team_name }}</h3>
      <div class="service-contact">
        <el-icon><Phone /></el-icon>
        <span>{{ service.tel }}</span>
      </div>
      <p class="service-description">{{ service.content }}</p>
      <router-link :to="{ name: 'user_team_detail', params: { id: service.id } }">
        <el-button type="primary" class="contact-btn"> 立即联系 </el-button>
      </router-link>
    </div>
  </el-card>
</template>

<script setup>
import { Phone } from "@element-plus/icons-vue";

defineProps({
  service: {
    type: Object,
    required: true,
  },
});
</script>

<style scoped>
.service-card {
  height: 100%;
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px 4px 0 0;
}

.service-content {
  padding: 20px;
}

.service-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--el-text-color-primary);
  margin: 0 0 15px 0;
}

.service-contact {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--el-color-primary);
  margin-bottom: 12px;
}

.service-description {
  color: var(--el-text-color-regular);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  min-height: 44px;
}

.contact-btn {
  width: 100%;
}
</style>
